<SCRIPT LANGUAGE="JavaScript" TYPE="text/JavaScript">


function UpdateForm()
{
   
  

  

   if(jobForm.status.value=='Pending'& jobForm.assigned.value!='Not Assigned' & jobForm.solution.value!='')
    {
     
     jobForm.status.style.color = 'red';
     alert('Pending Status');
     return ;
     }
    else
        {
        jobForm.solution.disabled=false;
        jobForm.status.style.color = 'black';
         
        }
       if(jobForm.assigned.value=='Not Assigned' & jobForm.closed.checked==true)
    {

     
     alert('cant close a job that is not assigned');
     return;
     }
    else
        {
        jobForm.solution.disabled=false;
        jobForm.status.style.color = 'black';

        }
if(jobForm.status.value=='On Hold' & jobForm.closed.checked==true)
    {
     
     jobForm.status.style.color = 'red';
     alert('Job On Hold');
     return;
     }
    else
        {
        jobForm.solution.disabled=false;
        jobForm.status.style.color = 'black';
        
        }

    if (jobForm.closed.checked==true & jobForm.solution.value=='')
        {
         
     jobForm.closed.style.color = 'red';
     alert('Cant close a job without a solution');
    return;
    }
    else
        {
         jobForm.solution.disabled=false;
        jobForm.closed.style.color = 'black';
        
        }
    if(jobForm.assigned.value=='Not Assigned1')
    {
      
      alert('Not Assigned');
      jobForm.assigned.style.color = 'red';
      return;
      }

    else
        {
        jobForm.solution.disabled=false;
        jobForm.assigned.style.color = 'black';
        
        }

     if(jobForm.solution.value!='' && jobForm.times.value=='')
         {
             times.style.color = 'red';
             return;
          }
         else
             {
              times.style.color = 'black';
              
             }
        

                submitbutton.style.display = 'block';
                var formObj = document.getElementById("jobForm");
                formObj.submit();
        
}

</SCRIPT>
